package other.nowcoder.easy;

import java.util.Scanner;

/**
 * @author bruin_du
 * @description 猴子分桃
 * https://www.nowcoder.com/questionTerminal/480d2b484e1f43af8ea8434770811b4a
 * @date 2022/5/25 23:29
 **/
public class MonkeyDividePeach {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextInt()){
            int n = in.nextInt();
            if(n == 0) break;
            long a = (long) Math.pow(5,n) - 4;
            long b = (long)Math.pow(4,n) + n - 4;
            System.out.println(a + " " + b);
        }
    }
}
